package com.ecomm.exception.struts;

import com.ecomm.util.Logger;
import org.apache.commons.logging.Log;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ExceptionHandler;
import org.apache.struts.config.ExceptionConfig;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * User: hou wanchun
 * Date: 2003-6-24
 * Time: 10:52:29
 * 不能找到指定的页面异常。产生的原因可能是页面不存在或者传入参数错误。
 */
public class NotFindPageExceptionHandler extends ExceptionHandler
{
    private static Log log = Logger.getLog(NotFindPageExceptionHandler.class);

    public ActionForward execute(Exception e, ExceptionConfig exceptionConfig, ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse httpServletResponse) throws ServletException
    {
        return actionMapping.findForward("login");
    }
}
